Now Available!

Native .Net
Components

TList WinForms
for
.Net Framework

&

MetaDraw WinForms
for
.Net Framework



Bennet-Tec
Components
Make you
look sharp!



Home

Company

Products

Order Forms

How To

Downloads

Updates

Support

Registration

Dependencies

Links

Compatibility

Site Map


Basic How To


How To Add a Table

View On-Line Sample
Return to main How To Page

InsertTable Method

Description:

This Method creates and inserts a new table into the document. The table is inserted before the paragraph currently pointed to by the cursor (check SelStart or CurPar properties). The column width is set automatically to the DocWidth divided by number of columns. Column boundaries may later be adjusted with the ChangeTableBound Method.

If the selection spans several paragraphs when calling this Method, the cursor position is considered as undefined and the insert table operation will be aborted.

Syntax:

status% = ALLText.InsertTable (Rows%, Columns%)

Parameters:

Rows% - number of rows;
Columns% - number of columns;

Return: status of operation performed

Value Description
0 ok
-1 incorrect version of ALLText, or memory allocation error
-4 the selection area spanned several paragraphs when the function was called. The cursor position is therefore undefined, operation failed

TableBorder Property

Description: This property read or changes information about the border type of a table that contains the cursor.

Syntax:

ALLText.TableBorder (Border)

Parameter:

Border - border type.

Valid values:

Value Description
-1 get current border information
0 ATX_TABLEBORDER_NONE - no border
1 ATX_TABLEBORDER_TABLE - table has outer border
2 ATX_TABLEBORDER_CELL - each cell has border
3 ATX_TABLEBORDER_TABLE + ATX_TABLEBORDER_CELL - each cell has border, outer border is of doubled thickness

Return: status of operation performed

Value Description
>=0 previous border type
-1 incorrect version of ALLText, or memory allocation error
ATX_UNDEFINED paragraphs selected don't belong to table, or a few tables are selected


Copyright© 2003 Bennet-Tec Information Systems, Inc. All rights reserved.